DOC-2254: Add Confluent Schema Registry schema migration via Shadowing#1776
DOC-2254: Add Confluent Schema Registry schema migration via Shadowing#1776Feediver1 wants to merge 10 commits into
Conversation
Documents the new v26.2 Schema Registry API-mode replication (shadow_schema_registry_api) for shadow links: - New page: Migrate Schemas from Confluent Schema Registry (intro, use cases, prerequisites, limitations, config steps, filtering, context mapping, validation policy, monitoring, failover) - setup.adoc: present topic mode vs API mode in the Schema Registry synchronization section - overview.adoc: add Schema Registry Sync task tab and update the replication lists - monitor.adoc: add Schema Registry sync status bullet - nav.adoc: add nav entry under Shadowing Feature is unreleased (ENG-1171, targets 26.2). DRAFT-VERIFY comments mark items to re-check after redpanda#30999 and redpanda#30984 merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
👷 Deploy Preview for redpanda-docs-preview processing.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Intro now follows what-it-does / how-it-works / benefit / when-to-use instead of opening with an imperative. Duplicate glossterms downgraded now that first mentions moved into the intro. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lication Full-file example anchors the per-setting fragments that follow: name + client_options + topic sync (from the canonical setup.adoc sample) plus the complete shadow_schema_registry_api section (field names verified against rpk types_test.go). Links to Configure Shadowing for the full connection/auth reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds lines=20-38 highlighting to the sample shadow link configuration so the shadow_schema_registry_api block stands out from the framing sections, and points to it from the lead-in. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
||
| * *Migrate from Confluent to Redpanda*: Replicate schemas continuously while xref:manage:disaster-recovery/shadowing/setup.adoc[Shadowing] replicates your topic data, then cut applications over to Redpanda once both are in sync. No separate schema migration tooling is required. | ||
| * *Phased migration*: Use context and subject filters to migrate one team, application, or environment at a time. | ||
| * *Registry reorganization*: Map source contexts to different destination contexts to restructure your Schema Registry as part of the migration. |
There was a problem hiding this comment.
@pgellert do we want to also mention here about disaster recovery? 🤔
| # connect to the source Kafka cluster, see the complete configuration file | ||
| # reference in Configure Shadowing. | ||
|
|
||
| topic_metadata_sync_options: |
There was a problem hiding this comment.
I'm not sure we need to provide topic_metadata_sync_options in context of schema registry shadowing 🤔
There was a problem hiding this comment.
Yes, we can remove the topic_metadata_sync_options section here, it's not needed.
There was a problem hiding this comment.
Removed in be45498 — the sample now goes straight from client_options to schema_registry_sync_options, and the highlight range is updated to match.
Addresses review feedback asking for explicit guidance on choosing between the two Schema Registry sync modes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| * Use *topic mode* (`shadow_schema_registry_topic`) when the source is another Redpanda cluster and you want an exact, complete replica of its Schema Registry. Topic mode shadows the `_schemas` topic byte for byte, so it does not filter, remap, or validate schemas. | ||
| * Use *API mode* (`shadow_schema_registry_api`) when the source is a Confluent Schema Registry, or when you need to replicate only selected contexts or subjects, map source contexts to different destination contexts, or control how schemas that use unsupported features are handled with a validation policy. | ||
|
|
||
| Schema replication does not add any cluster configuration properties. All settings live in the shadow link configuration. |
There was a problem hiding this comment.
This is false as stated, because we do add 2 new cluster configurations: https://github.com/redpanda-data/redpanda/blob/c153614a6972b0ee9e109ae93dc9d0a9369a1d37/src/v/config/configuration.cc#L3981-L3996
But they are escape hatches / tunables that won't commonly need to be adjusted.
There was a problem hiding this comment.
Fixed in be45498 — replaced the claim with the two tunables (schema_registry_sync_memory_bytes, schema_registry_sync_parallelism) and noted the defaults suit most deployments.
|
|
||
| == Limitations | ||
|
|
||
| * HTTP basic authentication is the only supported authentication method for the source registry. |
There was a problem hiding this comment.
mTLS is also supported as an authentication mechanism, in addition to HTTP Basic
There was a problem hiding this comment.
Fixed in be45498 — the limitation now lists HTTP basic and mTLS, and the connection section explains mTLS means a client certificate and key in tls_settings instead of auth_options.
| // DRAFT-VERIFY (DOC-2254): Get the exact list of unsupported Confluent schema features | ||
| // (rule sets? metadata tags?) from @pgellert and document them here. |
There was a problem hiding this comment.
In schema definitions:
- rule sets
- metadata tags
In configs: - override metadata
- override rule set
- default metadata
- default rule set
- compatibility group (note: not the same as compatibility level)
There was a problem hiding this comment.
Documented in be45498 — the validation policy section now lists these (schema definitions: rule sets, metadata tags; configs: override/default metadata and rule sets, compatibility groups), with your note that compatibility groups are not compatibility levels.
| // DRAFT-VERIFY (DOC-2254): ENG-1171 mentions wildcard support in filters, but the rpk | ||
| // source shows plain string lists for contexts/subjects. Confirm whether wildcards or | ||
| // patterns are accepted before documenting either behavior. |
There was a problem hiding this comment.
Only plain string lists for contexts and subjects is supported
There was a problem hiding this comment.
Documented in be45498 — 'The contexts and subjects lists accept literal names only. Wildcard and prefix patterns are not supported.' DRAFT-VERIFY removed.
| # connect to the source Kafka cluster, see the complete configuration file | ||
| # reference in Configure Shadowing. | ||
|
|
||
| topic_metadata_sync_options: |
There was a problem hiding this comment.
Yes, we can remove the topic_metadata_sync_options section here, it's not needed.
| Schema Registry Sync:: | ||
| + | ||
| -- | ||
| [#schema-registry-sync-task] | ||
| The **Schema Registry Sync task** replicates Schema Registry content so that applications that depend on schemas keep working after failover. | ||
|
|
||
| The task is controlled by the `schema_registry_sync_options` section in the configuration file. It supports two modes: | ||
|
|
||
| * **Topic mode** (`shadow_schema_registry_topic`): Shadows the `_schemas` system topic for byte-for-byte replication from another Redpanda cluster. | ||
| * **API mode** (`shadow_schema_registry_api`): Polls the source Schema Registry over HTTP and imports selected contexts and subjects, with validation. Use this mode to replicate schemas from a Confluent Schema Registry. See xref:manage:disaster-recovery/shadowing/migrate-schemas-confluent.adoc[Migrate Schemas from Confluent Schema Registry]. | ||
|
|
||
| A shadow link uses one mode or the other, not both. |
There was a problem hiding this comment.
One nuance here is that only API mode shadowing actually creates a explicit "Schema Registry Sync Task" that shows up in rpk shadow status. Topic mode replication just adds the _schemas topic to the list of topic partitions to shadow, it doesn't create a separate "Schema Registry Sync Task".
There was a problem hiding this comment.
Added in be45498 — the tab now notes that only API mode runs as a separate task in the shadow link status, and topic mode is monitored like any other shadow topic.
| // DRAFT-VERIFY (DOC-2254): Confirm with @pgellert whether the destination Schema Registry | ||
| // (_schemas topic) must be empty before enabling API-mode sync, or whether the destination | ||
| // bootstrap in redpanda#30999 relaxes this. Topic mode requires it; API mode is unconfirmed. |
There was a problem hiding this comment.
In API mode, the schemas topic doesn't have to be empty, but the target contexts the link would import (scoped to the mapped contexts based on the source_filter and destination fields) need to be empty.
There was a problem hiding this comment.
Fixed in be45498 — the DRAFT-VERIFY is replaced with a prerequisite: the destination contexts the link replicates into (per source_filter and destination mapping) must be empty, and the rest of the shadow cluster's registry is unaffected.
| Choose how replicated contexts are named on the shadow cluster: | ||
|
|
||
| * `identity`: Keep the source context names (default behavior for migrations). | ||
| * `exact`: Map each source context to a different destination context. |
There was a problem hiding this comment.
It's important to call out here that exact mapping needs to be exhaustive, and if the source schema registry has any contexts that are not mapped, that will lead to a failure of the schema syncing task.
We should recommend that people consider setting up a source_scope filter for the mapped source contexts if they expect that other contexts may later be created on the source schema registry that would fail the sync at a future inconvenient time.
There was a problem hiding this comment.
Added in be45498 as an IMPORTANT under the exact mapping example: mappings must cover every replicated context, an unmapped context fails the task, and we recommend scoping the source_filter contexts list to the mapped contexts to guard against contexts created later.
| // (_schemas topic) must be empty before enabling API-mode sync, or whether the destination | ||
| // bootstrap in redpanda#30999 relaxes this. Topic mode requires it; API mode is unconfirmed. | ||
|
|
||
| == Limitations |
There was a problem hiding this comment.
Another limitation to add is that there is currently no coordination between topic data replication and the schema registry syncing task, so topic data serialized with Confluent's SerDes format may contain schema IDs on the shadow cluster earlier than those schemas get replicated over.
There was a problem hiding this comment.
Added in be45498 as a limitation: topic data replication and schema replication are not coordinated, so records in the Confluent SerDes wire format can arrive before the schema IDs they contain have replicated.
There was a problem hiding this comment.
@pgellert what's the impact of this? Users should not attempt to read from topics that rely on SR until SR synced? Or will this cause write or replication errors?
| * *Phased migration*: Use context and subject filters to migrate one team, application, or environment at a time. | ||
| * *Registry reorganization*: Map source contexts to different destination contexts to restructure your Schema Registry as part of the migration. | ||
|
|
||
| == Prerequisites |
There was a problem hiding this comment.
One more to add here: if schema registry contexts are being used, customers must have the schema_registry_enable_qualified_subjects config enabled -- https://docs.redpanda.com/streaming/current/manage/schema-reg/schema-reg-contexts/#prerequisites
There was a problem hiding this comment.
Added in be45498 as a prerequisite, with xrefs to the schema_registry_enable_qualified_subjects property reference and the Schema Registry Contexts prerequisites. Noted it's enabled by default.
…as-confluent.adoc Co-authored-by: Gellért Peresztegi-Nagy <gellert.nagy@redpanda.com>
Corrections and additions from pgellert's review: - Two cluster tunables do exist (schema_registry_sync_memory_bytes, schema_registry_sync_parallelism); replace the "no cluster configuration properties" claim - mTLS is supported alongside HTTP basic auth for the source registry - Prerequisites: destination contexts owned by the link must be empty (rest of the registry need not be); qualified subjects config required for non-default contexts - Limitations: topic data and schema replication are not coordinated (SerDes records can reference not-yet-replicated schema IDs) - Remove topic_metadata_sync_options from the sample config and fix the highlight range - Filters accept literal names only (no wildcards/prefixes) - exact context mappings must be exhaustive: unmapped source contexts fail the task; recommend scoping source_filter - List the unsupported Confluent features (rule sets, metadata tags, override/default metadata and rule sets, compatibility groups) - Monitoring: task runs on the _schemas partition leader; counters are ephemeral and reset on restart or leadership movement - Failover: pausing the SR sync task (paused: true) is a required step; failover alone does not stop schema replication - overview.adoc: only API mode runs as a separate task in link status Resolves all DRAFT-VERIFY items except the sync-defaults re-check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
default_tail_interval=10s, default_full_sync_interval=5m, default_max_source_requests_per_second=30 confirmed in src/v/cluster_link/model/types.h at the v26.2.1-rc3 tag, matching the documented values. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
trevpanda
left a comment
There was a problem hiding this comment.
This looks great, I left a few suggestions.
| // (_schemas topic) must be empty before enabling API-mode sync, or whether the destination | ||
| // bootstrap in redpanda#30999 relaxes this. Topic mode requires it; API mode is unconfirmed. | ||
|
|
||
| == Limitations |
There was a problem hiding this comment.
@pgellert what's the impact of this? Users should not attempt to read from topics that rely on SR until SR synced? Or will this cause write or replication errors?
| - orders-value # A subject in the default context | ||
| ---- | ||
|
|
||
| The `contexts` and `subjects` lists accept literal names only. Wildcard and prefix patterns are not supported. |
There was a problem hiding this comment.
@pgellert how do the source filters on subjects work in conjunction with context filters? Does the example above really only apply "orders-value" subject in the default context? What about the .prod context?
Co-authored-by: Trevor Blackford <trevor.blackford@redpanda.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Documents the new v26.2 Schema Registry API-mode replication (
shadow_schema_registry_api) for shadow links:Review deadline: July14
Description
Resolves https://redpandadata.atlassian.net/browse/DOC-2254
Page previews
Sources of truth
All YAML field names verified against
src/go/rpk/pkg/cli/shadow/types.go(dev) and thetypes_test.goexample config. Defaults (10s tail / 5m full sync / 30 rps,FAILpolicy) fromsrc/v/cluster_link/model/types.h. Merged engineering PRs: redpanda#30695, #30723, #30764, #30835, #30860, #30905, #30933.Two engineering PRs were still open at draft time.
// DRAFT-VERIFY (DOC-2254)comments in the new page mark each item:paused(redpanda#30984)source_filter(epic mentions wildcards; rpk source shows plain string lists)rpk shadow createargument order against a 26.2 buildRelated
single-sourcetags withenv-cloudconditionals, ready for the cloud-docs stub):learning-objective-N:attributes are defined outside thesingle-sourcetag, but the{learning-objective-N}references are inside it. The cloud-docs stub header must define the same three attributes or the cloud build will render the references literally.Checks
🤖 Generated with Claude Code